<?php
	function envoyerMail($expediteur, $expediNom, $destinataire, $message, $objet)
	{
		$mail = new PHPMailer();

		$mail->IsSMTP();
		$mail->Host = "smtp.annecy.univ-savoie.fr";

		$mail->From = $expediteur;
		$mail->FromName = $expediNom;

		for($i = 0 ; $i < sizeof($destinataire) ; $i++)
		{
			$mail->AddAddress($destinataire[$i]);
		}

		$mail->Subject = $objet;
		$mail->Body = $message;
		$mail->WordWrap = 50;

		if(!$mail->SEnd())
			return false;
		else
			return true;
	}
?>